using System;
using System.Text;
using TccAg.VO;
using TccAg.DA;
using System.Data;
using System.Collections;
using System.Collections.Generic;


namespace TccAg.BR
{
    public class ProfessorBR
    {
        private ProfessorDA professorDA = new ProfessorDA();

        //INSERIR 
        public int inserir(ProfessorVO professor)
        {
            try
            {
                return professorDA.inserir(professor);
            }
            catch (Exception ex)
            {
               throw ex;
            }
        }

        //ATUALIZAR 
        public int atualizar(ProfessorVO professor)
        {
            try
            {
                return professorDA.atualizar(professor);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //EXCLUIR 
        public int excluir(ProfessorVO professor)
        {
            try
            {
                return professorDA.excluir(professor);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //LOAD ALL 
        public List<ProfessorVO> loadAll()
        {
            try
            {
                return professorDA.loadAll();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //LOAD BY PK
        public ProfessorVO loadByPk(ProfessorVO professor)
        {
            try
            {
                return professorDA.loadByPk(professor);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //LOAD BY FK
        public List<ProfessorVO> loadByDisciplina(DisciplinaVO disciplina)
        {
            try
            {
                return professorDA.loadByDisciplina(disciplina);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public int obterRelevancia(ProfessorVO professor, DisciplinaVO disciplina)
        {
            return 0;
        }

        //DATATABLE LOAD ALL 
        public DataTable dataTableLoadAll()
        {
            try
            {
                return professorDA.dataTableLoadAll();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

    }
}
